home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-21 / qwhite.zip / 286.TEC next >
Text File  |  1992-03-13  |  18KB  |  309 lines

  1. ID:D2 DESQview on 8088, 8086, and 80286 Processors
  2. Quarterdeck Technical Note #195
  3. by Michael Bolton
  4.  
  5. Q.  On which processors will DESQview multitask?
  6. Q.  How will DESQview use the memory on my system?
  7.  
  8. Many users ask if DESQview can multitask on a 286 machine.  The fact is, 
  9. DESQview can multitask on ANY processor in the Intel 8086 family, or its 
  10. compatibles.  This includes the 8088, the 8086, the NEC V20 and V30, the 
  11. 80286, the 80386 (in both the SX and DX flavors), and the i486 and i486SX.  
  12. DESQview 386 is simply DESQview and Quarterdeck ExPANded Memory Manager (QEMM-
  13. 386) in the same box.  On a 386 machine, QEMM-386's memory management makes 
  14. DESQview's job easier, but the DESQview half of DESQview 386 is EXACTLY THE 
  15. SAME as the stand-alone version of DESQview; not one byte of code is 
  16. different.
  17.  
  18. On 286 or lesser processors, DESQview's ability to multitask is limited only 
  19. by the amount of conventional and exPANded memory available, and by certain 
  20. hardware considerations.  This White Paper will outline how DESQview uses and 
  21. manages memory, will detail some of the constraints involved with the 286 and 
  22. lesser processors, and will explain why the 386 architecture is so important 
  23. in terms of memory management and multitasking.  Please note that the 386SX, 
  24. the 386DX, the i486, and the i486SX can all be considered as essentially the 
  25. same chip for the purposes of this discussion; all have the same memory 
  26. management features.
  27.  
  28. DESQview uses memory in the following ways:
  29.  
  30. Conventional Memory
  31. ===================
  32.  
  33. DESQview will run, and multitask programs, in available conventional memory.  
  34. Regrettably, DOS, device drivers, memory resident programs, and the like all 
  35. use conventional memory.  When DESQview is loaded, it too will use 
  36. conventional memory if there is no extra memory available.  On a typical 
  37. system with all of the above loaded, the largest memory available for 
  38. multitasking will be the amount of memory remaining --generally about 400K.  
  39. As many programs as can fit in this memory will run concurrently (that is, 
  40. they will truly multitask), but in this day of ever-larger applications, it is 
  41. impossible for multiple large programs to fit into this space.  When DESQview 
  42. no longer has room in memory for the next application to be loaded, the 
  43. program used least recently is swapped out, either to exPANded memory, to a 
  44. virtual disk (if the virtual disk's drive letter is specified in the 
  45. appropriate place in DESQview's Setup), or to a hard disk.  Although the 
  46. program will stop running while it is swapped out, when you switch back to it, 
  47. it will pick up where it left off.  In this context, DESQview performs as a 
  48. task-switcher.
  49.  
  50. This, combined with DESQview's other features, is more desirable for most 
  51. users than having to save the work in progress, exit the first program, and 
  52. reload the next.  Nevertheless, it is clearly more desirable still to allow 
  53. programs to continue running, even when they are in background.  To do this 
  54. with multiple large programs, DESQview uses exPANded memory.
  55.  
  56.  
  57. ExPANded Memory
  58. ===============
  59.  
  60. If exPANded memory is available, DESQview will use it for multitasking. Not 
  61. just any exPANded memory will do.  DESQview needs EEMS or EMS 4.0 exPANded 
  62. memory hardware for multitasking; this is because software emulation of 
  63. exPANded memory (on a 286 or lesser processor) cannot provide the memory 
  64. management which is needed for real multitasking. Software CAN be used to 
  65. activate the dramatically improved memory management features built right into 
  66. the 386 chip, but extra hardware is needed for the 80286 and its predecessors.
  67.  
  68. If you have EMS (only one E) 3.2 exPANded memory hardware on your system, 
  69. DESQview can use it to STORE program code and data, but not to RUN programs.  
  70. This is much faster than swapping programs to disk and makes DESQview a very 
  71. fast and powerful task-switcher.  Again, though, programs which are swapped to 
  72. exPANded memory will stop running.
  73.  
  74. Owners of EEMS (two Es) or EMS 4.0 hardware are in a much better position for 
  75. multitasking, since this type of hardware is capable of mapping conventional 
  76. memory (of which more later, in the section titled "Backfilling"). Note that 
  77. any of the following provides exPANded memory suitable for multitasking on a 
  78. 286:
  79.  
  80. 1) an EEMS or EMS 4.0 board that is able to (and set up to) provide memory to 
  81.    conventional memory addresses and make that memory mappable -- this will 
  82.    also work on an 8088 or 8086 processor; or,
  83.  
  84. 2) a 286 memory management unit, such as the All ChargeCard or the SOTA Pop 
  85.    Card.
  86.  
  87. 3) an 80386, 80386SX, or i486 upgrade with an appropriate memory manager such 
  88.    as QEMM-386.
  89.  
  90. Note also that each of the above items involves some sort of hardware add-on 
  91. to an 8088, 8086, or 80286.
  92.  
  93. The following DO NOT provide memory suitable for multitasking on a 286 or 
  94. less:
  95.  
  96. 1) an EMS 4.0 emulator; that is, a software driver that turns exTENded memory 
  97.    into simulated exPANded memory; or,
  98.  
  99. 2) an EMS 4.0 board that only provides software support for EMS 4.0, and which 
  100.    does not allow memory on the board to be mapped to addresses below 640K; or,
  101.  
  102. 3) an EMS 3.2 board, whether it has an EMS 4.0 software driver or not; or,
  103.  
  104. 4) a board that provides only exTENded memory; or,
  105.  
  106. 5) the exTENded memory on a 286 motherboard.
  107.  
  108.  
  109. ExTENded Memory
  110. ===============
  111.  
  112. DOS's addressing limit is 1 megabyte (MB), from 0KB to 1024KB.  Of this, the 
  113. lower 640K of addresses are used for conventional memory; the upper 384K of 
  114. address are reserved for various system resources.  On a typical 286, there is 
  115. no usable memory connected to these higher addresses between 640K and 1024K, 
  116. except for BIOS ROMs, display adapters, video cards, and the like.  Most 
  117. addresses in this region have no memory attached to them at all.  Confusion 
  118. often stems from the fact that many 286s come with 384K of exTENded memory.  
  119. EXTENDED MEMORY IS ADDRESSED AFTER THE 640K TO 1024K REGION, ABOVE 1024K --
  120. outside of DOS's address space entirely.  Consequently, this memory is 
  121. invisible to most DOS programs, except those in a special class called DOS-
  122. exTENded applications.  Disk caches, RAM disks, print spoolers, and the like 
  123. can store data in exTENded memory, and DOS-exTENded applications can run their 
  124. code in exTENded memory, but exTENded memory is not usable for running regular 
  125. DOS programs.
  126.  
  127. Once again, on the 386 chip, the situation is very different.  Under the 
  128. control of a 386 memory manager such as QEMM-386, and a multitasking program 
  129. like DESQview, exTENded memory can be converted to exPANded memory, and can 
  130. therefore be made useful for running and multitasking regular DOS 
  131. applications.  This is due once again to the hardware built into the 386 chip; 
  132. the 286 lacks these features, and needs extra hardware to provide them.  THIS, 
  133. AND NOT SPEED, IS THE CRUCIAL DIFFERENCE BETWEEN THE 286 AND 386 ARCHITECTURE.
  134.  
  135. With Quarterdeck's exTENded memory driver, QEXT.SYS, DESQview can load nearly 
  136. 64K of itself into the first 64K of exTENded memory, thanks to an idiosyncracy 
  137. of the 286 processor.  The net effect of this is to reduce DESQview's 
  138. conventional memory overhead by nearly 64K.
  139.  
  140.  
  141. Backfilling
  142. ===========
  143.  
  144. When a program accesses a piece of memory, say at address 6000:0000 
  145. (henceforth, simply 6000), memory on the motherboard at address 6000 is made 
  146. available to the program.  If, on the other hand, there is NO MEMORY on the 
  147. motherboard at this address, the request goes out to boards in the expansion 
  148. slots, and the exPANded memory board has the opportunity to supply the memory 
  149. for that address from its pool of exPANded memory.  Therefore, if you want an 
  150. exPANded memory board, rather than motherboard memory, to provide memory to 
  151. conventional memory addresses, it becomes necessary to first disable 
  152. motherboard memory.  If the exPANded memory board is under the control of a 
  153. powerful program like DESQview, the board can then be instructed to supply 
  154. DIFFERENT portions of exPANded memory to the processor at different times. 
  155. Supplying memory from an exPANded memory board to replace disabled motherboard 
  156. memory is called "backfilling" -- because memory is replaced from the top of 
  157. conventional memory (usually 640K) to some lower address.
  158.  
  159. When a program starts under DESQview's control on a system backfilled with 
  160. exPANded memory, DESQview runs that program in conventional memory -- 
  161. conventional memory supplied not by the motherboard, but by the exPANded 
  162. memory board.  When a second program is opened, DESQview looks at how much 
  163. memory that program needs.  If the program cannot fit in conventional memory 
  164. along with the first program, DESQview tells the EMS board two things.  First, 
  165. it tells the EMS board to allocate an amount of exPANded memory equivalent to 
  166. the size of the program.  Then it maps that chunk of exPANded memory into 
  167. DOS's address space, and the program runs in that exPANded memory.  The 
  168. program which was previously running stays in its memory space on the exPANded 
  169. memory card -- it just is not visible to DOS.  The new program runs in a 
  170. different memory space on the card, and IS visible to DOS, because DESQview 
  171. and the EMS board tell DOS that.  Only one program appears to be below 640K at 
  172. a time; DESQview manages which one.
  173.  
  174. Since the EMS board is supplying memory to addresses below 640K, the program 
  175. running in exPANded memory is unaware of any of this, and runs as if it were 
  176. in conventional memory.  Then, after a suitable amount of time, DESQview stops 
  177. the second program, and the EMS board then is requested to map the memory 
  178. allocated to the first program back into conventional memory addresses.  This 
  179. process repeats, allowing both programs a portion of the processor's time.  If 
  180. this seems clumsy and inefficient, remember that all this is happening at 
  181. processor speed, and is therefore almost impossible for the user to notice.  
  182. When a third program is started, DESQview tells the exPANded memory board to 
  183. allocate another chunk of exPANded memory, and each of the three programs gets 
  184. a slice of time to do its work.
  185.  
  186. Note that this process will only work if there is no conventional memory on 
  187. the motherboard to intercept the various calls for address (in our example) 
  188. 6000. If there IS memory on the motherboard at that address, the exPANded 
  189. memory board will never receive the call, and DESQview won't be able to run 
  190. programs in exPANded memory.  Therefore, it is best to be able to deactivate 
  191. as much conventional memory as possible. Disabling memory is done by setting 
  192. switches or jumpers on the motherboard, and/or by running your computer's 
  193. setup program; the manual for your system should tell you how this is done.  
  194. Almost all motherboards will allow you to disable 128K of memory, and many 
  195. will permit disabling conventional memory down to 256K.  In this instance, the 
  196. EMS board will supply memory to addresses from 256K to 640K, for a total of 
  197. 384K.  Here DESQview will allow the first program opened to be as large as 
  198. available conventional memory (minus the overhead discussed above), and each 
  199. subsequent program can be as large as 384K in size.
  200.  
  201. On some motherboards, you are permitted to disable conventional memory right 
  202. down to 0K; this is relatively rare, but makes life very comfortable for 
  203. DESQview.  In this scenario, DESQview can multitask multiple programs which 
  204. are as large as available conventional memory --which is the ideal.  Another 
  205. compelling feature of 80386SX, 80386, and i486 processors is that they can act 
  206. as if they have their memory disabled down to 0K without actually disabling 
  207. any memory--and this is one of the main reasons that the 386 architecture is 
  208. so popular for multitasking.
  209.  
  210. Note also that on 286s that are using a memory management unit (the All 
  211. Chargecard or the SOTA Pop Card, as mentioned above), the effect is the same 
  212. as being able to disable conventional memory to 0K.
  213.  
  214. If the "Largest Available exPANded Memory" field in DESQview's Memory Status 
  215. program is "0" (or 0K) immediately after you start DESQview, then you either 
  216. do NOT have the right kind of exPANded memory board or you have not set it up 
  217. to provide exPANded memory to conventional memory addresses below 640K.  
  218. Again, refer to the documentation for your computer and for your exPANded 
  219. memory board.
  220.  
  221.  
  222. Display
  223. =======
  224.  
  225. There are more than just memory constraints involved in multitasking on a 286 
  226. or less.  Programs can display their information in two ways: they can ask DOS 
  227. or the system's BIOS (Basic Input-Output Services) to do it for them, or they 
  228. can write directly to the screen hardware.  The former type of program is 
  229. called "well-behaved" in DESQview parlance. Programs which write text directly 
  230. to screen without going through DOS or the BIOS, and all programs which 
  231. display graphics, are called (predictably) "misbehaved" because such programs, 
  232. running in background, will overwrite information in the foreground window.  
  233. There is a third type of program, called "DESQview/TopView-aware."  This sort 
  234. of program will automatically write to the alternate video buffer if it 
  235. detects that it is running under DESQview or TopView; otherwise, it will write 
  236. directly to screen -- the best of both worlds.
  237.  
  238. In some cases, misbehaved programs can be configured through their own setup 
  239. routines to write through DOS or the BIOS, in which case DESQview can redirect 
  240. screen writes to an area of memory which DESQview sets up called the alternate 
  241. video buffer.  DESQview has also, for several years, included loaders for some 
  242. of the most popular misbehaved programs; these loaders trap output from 
  243. misbehaved programs and direct it to the alternate video buffer.
  244.  
  245. On a 286 or less, if your program cannot be configured to be well-behaved, and 
  246. if there is no DESQview loader for it, its output will "bleed through" to the 
  247. foreground screen unless you stop it from running in background.
  248.  
  249. On a 386 processor, regardless of a program's behavior, DESQview 386 can 
  250. "virtualize" the screen.  Virtualization causes a program which writes 
  251. directly to screen to write elsewhere, with the practical upshot that it can 
  252. be run in background or in a small window.  See VIRTUAL.TEC and DIRECTLY.TEC, 
  253. two other Quarterdeck White Papers, for more information on this.  Note that 
  254. this feature is not available on a system running anything less than a 386SX 
  255. processor, nor is it available without DESQview 386 (that is, DESQview and 
  256. QEMM-386 on the same system).
  257.  
  258.  
  259. More Information
  260. ================
  261.  
  262. The manual for Quarterdeck's Manifest program is an excellent introduction to 
  263. memory management -- Manifest's purpose is to show you how the memory on your 
  264. machine is configured, how to best take advantage of what you have, and how to 
  265. improve it.  Manifest is included with every copy of QRAM and QEMM-386 (and 
  266. thus it's included with every copy of DESQview 386 as well), and is available 
  267. separately if you wish; all of these packages are available at your favourite 
  268. dealer. Many of the other Quarterdeck White Papers contain information related 
  269. to the topics discussed here; one of the White Papers, BOOKS.TEC, contains a 
  270. good list of books on various topics related to memory management and 
  271. multitasking.
  272.  
  273.  
  274. Summing Up
  275. ==========
  276.  
  277. Regardless of the processor, DESQview will multitask as many programs as will 
  278. fit in conventional and EMS 4 or EEMS exPANded memory.  Even on an 8088 with 
  279. 640K of memory, this power is not to be underestimated; for example, there are 
  280. several excellent communications programs on the market that will run under 
  281. DESQview in very little memory, allowing you to download in background and use 
  282. a text editor at the same time.  DESQview also provides macro and dialer 
  283. facilities, and powerful Mark and Transfer features which allow you to move 
  284. information easily from one window to another.  The DESQview Companions, our 
  285. suite of desktop accessories, can all fit into less than 200K of memory 
  286. simultaneously.
  287.  
  288. DESQview is a very powerful multitasker, and will provide excellent 
  289. performance on 80286 and 8086/8088 machines IF YOU CONSIDER THE LIMITATIONS OF 
  290. THESE PROCESSORS.  If you provide DESQview with EMS 3.2 exPANded memory, it 
  291. will work faster;  if you put EMS 4.0 or EEMS memory on the system, and 
  292. disable as much motherboard memory as possible, DESQview will perform better 
  293. still.
  294.  
  295. Nothing compares to a 386, however.  It's much faster; when QEMM-386 is in the 
  296. system, it requires no special hardware to provide exPANded memory; and it has 
  297. virtualization and protection features which keep multiple programs out of 
  298. each other's hair.  On the other hand, if you own DESQview, you already own 
  299. half of DESQview 386, and all you'll require when you upgrade your hardware is 
  300. the other half -- Quarterdeck ExPANded Memory Manager 386 (QEMM-386)!  Get 
  301. started now, and get a taste for multitasking!
  302.  
  303.  
  304.   ************************************************************************
  305.   *This technical note may be copied and distributed freely as long as it*
  306.   *is distributed in its entirety and it is not distributed for profit.  *
  307.   *         Copyright (C) 1990-2 by Quarterdeck Office Systems           *
  308.   ************************ E N D   O F   F I L E *************************
  309.